import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'

// 1. 引入你需要的组件
import {
  Button,
  Toast,
  Calendar,
  Dialog,
  Tabbar,
  TabbarItem,
  Form,
  Field,
  Swipe,
  SwipeItem,
  Cell,
  Empty,
  ActionBarButton,
  ActionBarIcon,
  ActionBar,
  CellGroup
} from 'vant'
// 2. 引入组件样式
import 'vant/lib/index.css'

import router from './router'

//引入axios的配置
import axios from './utils/axios'

//引入mock
import './mock'

// 引入 pxTorem
import 'amfe-flexible'

const app = createApp(App)

// 3. 注册你需要的组件
app.use(Button)
app.use(Toast)
app.use(Calendar)
app.use(Dialog)
app.use(Tabbar)
app.use(TabbarItem)
app.use(Form)
app.use(Field)
app.use(Swipe)
app.use(SwipeItem)
app.use(Cell)
app.use(Empty)
app.use(ActionBarButton)
app.use(ActionBarIcon)
app.use(ActionBar)
app.use(CellGroup)

//挂载路由
app.use(router)
//将axios挂载到Vue的实例化对象上
app.config.globalProperties.$axios = axios

app.mount('#app')
